package ie.dkit.java3Demulation.objects;

import java.util.ArrayList;
import java.util.Collection;

import ie.dkit.java3Demulation.drawer.CircleDrawable;
import ie.dkit.java3Demulation.objects3d.*;

public class Circle implements CircleDrawable {
	private Point m_Center;

	private double m_Radius;

	private String name;

	public Circle() {
		this(new Point(), 50);
		name = "Circle";
	}

	public Circle(Point c, int r) {
		m_Radius = r;
		m_Center = c;
	}

	public void setCenter(Point3D point3D) {
		m_Center = point3D;
	}

	public Point getCenter() {
		return m_Center;
	}

	public void setRadius(double radius) {
		this.m_Radius = radius;
	}

	public double getRadius() {
		return m_Radius;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see ie.dkit.java3Demulation.objects.GraphicsObject#getName()
	 */
	public String getName() {
		return name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see ie.dkit.java3Demulation.objects.GraphicsObject#setName(java.lang.String)
	 */
	public void setName(String name) {
		this.name = name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see ie.dkit.java3Demulation.linedrawing.Drawable#getCircles()
	 */
	public Collection<Circle> getCircles() {
		Collection<Circle> circles = new ArrayList<Circle>();
		circles.add(this);
		return circles;
	}
}
